package cn.wolfcode.wolf2w.query;

import lombok.Getter;
import lombok.Setter;

import java.util.HashMap;
import java.util.Map;

@Getter
@Setter
public class TravelQuery extends QueryObject {
    private String destId;
    private int dayType = -1;

    public Map<String, Integer> getDay(){
        HashMap<String, Integer> map = new HashMap<>();
        int min = 0;
        int max = 0;
        switch (this.dayType){
            case 1:
                max = 3;break;
            case 2:
                min = 4;max = 7;break;
            case 3:
                min = 8;max = 14;break;
            case 4:
                min = 15;max = Integer.MAX_VALUE;break;
            default:
                return map;
        }
        map.put("min",min);
        map.put("max",max);
        return map;
    }
}
